package secondStage.part5.多线程.线程安全;

/**
 * @ClassName: [SellTicketDemo4]
 * @Description: Lock锁
 * @Author: [黄劲松]
 * @CreateDate: [2021-04-05]
 * @Version: [v1.0]
 */

public class SellTicketDemo4 {
    public static void main(String[] args) {
        //创建SellTicket类对象
        SellTicket4 st = new SellTicket4();
        //创建三个Thread类的对象，吧SellTicket对象作为构造方法的参数
        Thread t1 = new Thread(st, "窗口1");
        Thread t2 = new Thread(st, "窗口2");
        Thread t3 = new Thread(st, "窗口3");
        //启动线程
        t1.start();
        t2.start();
        t3.start();
    }
}
